package com.zj.eurekaclient.controller;

import com.zj.eurekaclient.client.UserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: zj
 * @Date: 2018/11/14 11:13
 * @Description:
 */
@RestController
public class ClientController {

    @Autowired
    private UserClient userClient;//此处红色，只有运行时才注入；编译时不注入，idea会报红。不碍事，正常情况

    @GetMapping("/getMsg")
    public String getMsg() {
        return userClient.test2();
    }

}
